Method and apparatus for integrated modeling, simulation and analysis of chemical and biochemical reactions

ABSTRACT

An integrated system for modeling, simulating and analyzing chemical and biochemical reactions includes a modeling environment for constructing a model of a chemical or biochemical reaction. The system also includes a simulation engine accepting as input said constructed model of the chemical or biochemical reaction and generating as output an expected result. An analysis environment communicates with the simulation engine and displays the expected result.

FIELD OF THE INVENTION

The present invention relates to simulation tools and, in particular, toan integrated environment for modeling, simulating and analyzingchemical and biochemical reactions.

BACKGROUND OF THE INVENTION

Development of new chemical and biochemical substances is time-consumingbecause a number of intermediate substances are traditionally formulatedbefore formulation of a substance with the desired properties isobtained, and formulation of each intermediate substance can takes hoursor days. Chemical formulation includes manufacture of traditionalorganic or polymer substances, as well as the development ofsmall-molecule machinery, sometimes referred to as nanomachinery.Biochemical formulation includes the development and analysis ofpharmaceutical substances that affect an individual's quality of life.In addition to the tedious and often error-prone nature of chemical andbiochemical formulation, both of these fields face additionaldifficulties.

Development of chemical substances and nanomachinery, in addition tobeing time-consuming, can generate potentially dangerous intermediatesubstances. For example, in attempting to formulate bacteria thatconsumes crude oil and breaks it down into one or moreenvironmentally-friendly substances, a researcher may instead formulatea bacterium that breaks crude oil into a number ofenvironmentally-friendly substances and a lethal toxin. Additionally,chemical researchers are faced with the problem of disposing of theintermediate products generated by their research. Other issued faced bydesigners of nanomachinery is that the target substance may mutateduring formulation in response to environmental factors.

Biochemical research, which typically focuses on identifying andselecting compounds having the potential to affect one or moremechanisms thought to be critical in altering specific, clinical aspectsof a disease processes faces challenges in addition to the onesdescribed above.

Although drug development is typically motivated by research dataregarding cellular and subcellular phenomena, the data often considersonly an isolated and rather narrow view of an entire system. Such datamay not provide an integrated view of the complete biological system.Moreover, the narrow findings reported are not always entirely accuratewhen translated to the whole body level.

Moreover, current methods of obtaining data for biological processes areeven more time-consuming than those associated with chemical processes,because the latter generally require laboratory experiments that lead toanimal experiments and clinical trials. From these trials andexperiments, data are obtained which, again, usually focus on a verynarrow part of the biological system. Only after numerous costlytrial-and-error clinical trials and constant redesigning of the clinicaluse of the drug to account for lessons learned from the most recentclinical trial, is a drug having adequate safety and efficacy finallyrealized. This process of clinical trial design and redesign, multipleclinical trials and, in some situations, multiple drug redesignsrequires great expense of time and money. Even then, the effort may notproduce a marketable drug. While conclusions may be drawn byassimilating experimental data and published information, it isdifficult, if not impossible, to synthesize the relationships among allthe available data and knowledge.

The various challenges faced by chemical and biochemical researchersmake it desirable to have systems and methods for modeling, simulating,and analyzing biological processes in-silico rather than in-vivo orin-vitro.

BRIEF SUMMARY OF THE INVENTION

In one aspect the present invention relates to a system that integratesmodeling, simulation and analysis of biological reactions. The systemincludes a modeling component for constructing a model of a biologicalsystem. The component includes a simulation engine in communication withsaid modeling component accepting as input the constructed model andgenerates as output the simulated dynamic response of the model. Ananalysis environment may be used both to study properties of the modelsas well as to communicate with the simulation engine in such a way thatresults from analysis can be incorporated into the running model. Insome embodiments, the modeling component allows construction of a blockdiagram model of the biological system. In some of these embodiments,the modeling component includes at least one block identifying a set ofrelated chemical reactions. Those skilled in the art will appreciatethat they system may be applied to chemical reactions as well as tobiological processes found in a biological system.

In another aspect the present invention relates to a method forintegrated modeling, simulation and analysis of a biological process. Amodel of the biochemical process is created. In one embodiment, agraphical user interface for accepting user commands and data isprovided and user commands and data are received via the provided userinterface and the received user commands and data are used to constructa model of the biological process, which may be used in both static anddynamic analysis of the model as well as in comparison of predictedresults with experimental data.

In still another aspect the present invention relates to an article ofmanufacture having embodied thereon computer-readable program means forintegrated modeling, simulation and analysis of a biological process.Embodied on the article of manufacture are computer-readable programmeans constructing a model of a biological process; computer-readableprogram means for generating, using the constructed model, dynamicbehavior of the modeled biological process; and computer-readableprogram means for displaying the dynamic behavior.

In accordance with a further aspect of the present invention, a systemfor integrative modeling, simulation and analysis of a chemical reactionis provided. The system includes a modeling component for constructing amodel of the chemical reaction. The system also includes a simulationengine that is in communication with the modeling component. Thesimulation engine accepts as input the constructive model of thechemical reaction and generates an expected output based on the model.An analysis environment that is in communication with the simulationengine and the modeling component performs analysis and displays theexpected output.

In accordance with an additional aspect of the present invention amethod is provided for integrated modeling simulation analysis ofchemical reactions. In accordance with this method, a model of achemical reaction is constructed and the model is used to generate anexpected output for the modeled chemical reaction. This expected outputis displayed on a display device.

The present invention relates to a method for integrated modeling,simulation, and analysis of chemical and biochemical reactions. A modelof a chemical or biochemical reaction is constructed and the constructedmodel is analyzed in an analysis environment to generate a result. Thegenerated result is transmitted back to the modeling environment.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is pointed out with particularity in the appended claims.The advantages of the invention described above, and further advantagesof the invention, may be better understood by reference to the followingdescription taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 is a block diagram of one embodiment of an integrated modeling,simulation and analysis environment;

FIG. 2A is a block diagram of one embodiment of personal computer usefulin connection with the present invention;

FIG. 2B is a block diagram of another embodiment of a personal computeruseful in connection with the present invention;

FIGS. 3A and 3B are screenshots depicting embodiments of a tabularmodeling environment useful in connection with the present invention;

FIG. 4 is a screenshot of one embodiment of a graphical user interfacethat facilitates construction of block diagram representations ofchemical reactions or biological processes;

FIG. 5A is a block diagram depicting a model of a dynamic system usingordinary differential equations;

FIG. 5B is a block diagram depicting a model of a dynamic system usingdifference equations;

FIG. 5C is a block diagram depicting a model of a dynamic system usingalgebraic equations;

FIG. 6 is a flowchart depicting one embodiment of the steps taken tosimulate a modeled biological process or chemical reaction;

FIG. 7 depicts a block diagram of the allocated memory for a solver;

FIG. 8A depicts a block diagram of the allocated memory for a solvershowing the part of memory holding both values and references;

FIG. 8B depicts a block diagram of the allocated memory for a solvershowing the part of memory holding both values and references and theparallel indexing of only references;

FIG. 9 is a flow chart of the sequence of steps followed by theillustrative embodiment of the present invention to implement therestoration mechanism prior to execution.

DETAILED DESCRIPTION OF THE INVENTION

Referring now to FIG. 1, a high-level block diagram of one embodiment ofan integrated system for modeling, simulating, and analyzing chemicalreactions and biological systems that include biological processes 100is shown. As shown in FIG. 1, the system 100 includes a modelingcomponent designated as a modeling environment 110 in the exemplarydepiction of FIG. 1, a simulation engine 120, and an analysisenvironment 130. The simulation engine 120 communicates with themodeling environment 110. The simulation engine 120 receives models ofchemical reactions or biological processes generated using the modelingenvironment 110. The simulation engine 120 communicates refinements tomodels created in the modeling environment 110. The analysis environment130 is in communication with both the modeling environment 110 and thesimulation engine 120. The analysis environment 130 may be used toperform various types of analysis directly on models created in themodeling environment 110. Also, the analysis environment 130 may receiveand process results from the simulation engine 120 representing theexecution by the simulation engine 120 of a model produced in themodeling environment. In other words, the simulation engine 120generates the dynamic behavior of the model and communicates at leastsome of this dynamic behavior to the analysis environment. The analysisenvironment 130 may provide refinements to a model in the modelingenvironment 110 and may provide parameters for use by the simulationengine 120 when executing a model. The interaction between the modelingenvironment 110, the simulation engine 120, and the analysis environment130 will be discussed in more detail below.

The integrated system depicted in FIG. 1 may execute on a number ofdifferent computing platforms, such as supercomputers, mainframecomputers, minicomputers, clustered computing platforms, workstations,general-purpose desktop computers, laptops, and personal digitalassistants. FIGS. 2A and 2B depict block diagrams of typicalgeneral-purpose desktop computers 200 useful in the present invention.As shown in FIGS. 2A and 2B, each computer 200 includes a centralprocessing unit 202, and a main memory unit 204. Each computer 200 mayalso include other optional elements, such as one or more input/outputdevices 230 a-230 b (generally referred to using reference numeral 230),and a cache memory 240 in communication with the central processing unit202.

The central processing unit 202 is any logic circuitry that responds toand processes instructions fetched from the main memory unit 204. Inmany embodiments, the central processing unit is provided by amicroprocessor unit, such as: the 8088, the 80286, the 80386, the 80486,the Pentium, Pentium Pro, the Pentium II, the Celeron, or the Xeonprocessor, all of which are manufactured by Intel Corporation ofMountain View, Calif.; the 68000, the 68010, the 68020, the 68030, the68040, the PowerPC 601, the PowerPC604, the PowerPC604e, the MPC603e,the MPC603ei, the MPC603ev, the MPC603r, the MPC603p, the MPC500, theMPC740, the MPC745, the MPC750, the MPC755, the MPC 5500, the MPC7400,the MPC7410, the MPC7441, the MPC7445, the MPC7447, the MPC7450, theMPC7451, the MPC7455, the MPC7457 processor, all of which aremanufactured by Motorola Corporation of Schaumburg, Illinois; the CrusoeTM5800, the Crusoe TM5600, the Crusoe TM5500, the Crusoe TM5400, theEfficeon TM8600, the Efficeon TM8300, or the Efficeon TM8620 processor,manufactured by Transmeta Corporation of Santa Clara, Calif.; theRS/6000 processor, the RS64, the RS 64 II, the P2SC, the POWER3, theRS64 III, the POWER3-II, the RS 64 IV, the POWER4, the POWER4+, thePOWER5, or the POWER6 processor, all of which are manufactured byInternational Business Machines of White Plains, New York; or the AMDOpteron, the AMD Athalon 64 FX, the AMD Athalon, or the AMD Duronprocessor, manufactured by Advanced Micro Devices of Sunnyvale, Calif.

Main memory unit 204 may be one or more memory chips capable of storingdata and allowing any storage location to be directly accessed by themicroprocessor 202, such as Static random access memory (SRAM), BurstSRAM or SynchBurst SRAM (BSRAM), Dynamic random access memory (DRAM),Fast Page Mode DRAM (FPM DRAM), Enhanced DRAM (EDRAM), Extended DataOutput RAM (EDO RAM), Extended Data Output DRAM (EDO DRAM), BurstExtended Data Output DRAM (BEDO DRAM), Enhanced DRAM (EDRAM),synchronous DRAM (SDRAM), JEDEC SRAM, PC100 SDRAM, Double Data RateSDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SyncLink DRAM (SLDRAM),Direct Rambus DRAM (DRDRAM), or Ferroelectric RAM (FRAM). In theembodiment shown in FIG. 2A, the processor 202 communicates with mainmemory 204 via a system bus 220 (described in more detail below). FIG.2B depicts an embodiment of a computer system 200 in which the processorcommunicates directly with main memory 204 via a memory port. Forexample, in FIG. 2B the main memory 204 may be DRDRAM.

FIGS. 2A and 2B depict embodiments in which the main processor 202communicates directly with cache memory 240 via a secondary bus,sometimes referred to as a “backside” bus. In other embodiments, themain processor 202 communicates with cache memory 240 using the systembus 220. Cache memory 240 typically has a faster response time than mainmemory 204 and is typically provided by SRAM, BSRAM, or EDRAM.

In the embodiment shown in FIG. 2A, the processor 202 communicates withvarious I/O devices 230 via a local system bus 220. Various busses maybe used to connect the central processing unit 202 to the I/O devices230, including a VESA VL bus, an ISA bus, an EISA bus, a MicroChannelArchitecture (MCA) bus, a PCI bus, a PCI-X bus, a PCI-Express bus, or aNuBus. For embodiments in which the I/O device is a video display, theprocessor 202 may use an Advanced Graphics Port (AGP) to communicatewith the display. FIG. 2B depicts an embodiment of a computer system 200in which the main processor 202 communicates directly with I/O device230 b via HyperTransport, Rapid I/O, or InfiniBand. FIG. 2B also depictsan embodiment in which local busses and direct communication are mixed:the processor 202 communicates with I/O device 230 a using a localinterconnect bus while communicating with I/O device 230 b directly.

A wide variety of I/O devices 230 may be present in the computer system200. Input devices include keyboards, mice, trackpads, trackballs,microphones, and drawing tablets. Output devices include video displays,speakers, inkjet printers, laser printers, and dye-sublimation printers.An I/O device may also provide mass storage for the computer system 200such as a hard disk drive, a floppy disk drive for receiving floppydisks such as 3.5-inch, 5.25-inch disks or ZIP disks, a CD-ROM drive, aCD-R/RW drive, a DVD-ROM drive, tape drives of various formats, and USBstorage devices such as the USB Flash Drive line of devices manufacturedby Twintech Industry, Inc. of Los Alamitos, California.

In further embodiments, an I/O device 230 may be a bridge between thesystem bus 220 and an external communication bus, such as a USB bus, anApple Desktop Bus, an RS-232 serial connection, a SCSI bus, a FireWirebus, a FireWire 800 bus, an Ethernet bus, an AppleTalk bus, a GigabitEthernet bus, an Asynchronous Transfer Mode bus, a HIPPI bus, a SuperHIPPI bus, a SerialPlus bus, a SCI/LAMP bus, a FibreChannel bus, or aSerial Attached small computer system interface bus.

General-purpose desktop computers of the sort depicted in FIGS. 2A and2B typically operate under the control of operating systems, whichcontrol scheduling of tasks and access to system resources. Typicaloperating systems include: MICROSOFT WINDOWS, manufactured by MicrosoftCorp. of Redmond, Wash.; MacOS, manufactured by Apple Computer ofCupertino, California; OS/2, manufactured by International BusinessMachines of Armonk, N.Y.; and Linux, a freely-available operating systemdistributed by Caldera Corp. of Salt Lake City, Utah, among others.

In still other embodiments the computers may operate under the controlof real-time operating systems such as AMX, KwikNet, KwikPeg (allmanufactured by KADAK Products Ltd.), C EXECUTIVE (manufactured by JMISoftware Systems, Inc.), CMX-RTX (manufactured by CMX Systems, Inc.),DeltaOS (manufactured by CoreTek Systems, Inc.), eCos (manufactured byRed Hat, Inc.), embOS (manufactured by SEGGER Microcontroller SystemeGmbH), eRTOS (manufactured by JK Microsystems, Inc.), ETS (manufacturedby VenturCom), EYRX (manufactured by Eyring Corporation), INTEGRITY(manufactured by Green Hills Software, Inc.), INtime® real timeextension to Windows® (manufactured by TenAsys Corporation), IRIX(manufactured by SGI), iRMX (manufactured by TenAsys Corporation), Jbed(manufactured by esmertec, inc.), LynxOS (manufactured by LynuxWorks),MQX (manufactured by Precise Software Technologies Inc), Nucleus PLUS(Accelerated Technology, ESD Mentor Graphics), On Time RTOS-32(manufactured by On Time Informatik GmbH), OS-9 (manufactured byMicroware Systems Corporation), OSE (manufactured by OSE Systems), PDOS(manufactured by Eyring Corporation), PSX (manufactured by JMI SoftwareSystems, Inc.), QNX Neutrino (manufactured by QNX Software SystemsLtd.), QNX4 (manufactured by QNX Software Systems Ltd.), REDICE-Linux(manufactured by REDSonic, Inc.), RTLinux (manufactured by Finite StateMachine Labs, Inc.), RTX 5.0 (manufactured by VenturCom), Portos(manufactured by Rabih Chrabieh), smx (manufactured by Micro Digital,Inc.), SuperTask! (manufactured by U S Software), ThreadX (manufacturedby Express Logic, Inc.), Treck AMX (manufactured by Elmic Systems USA,Inc.), Treck MicroC/OS-II (manufactured by Elmic Systems USA, Inc.),TronTask! (manufactured by U S Software), TTPos: (manufactured by TTTechComputertechnik AG), Virtuoso (manufactured by Eonic Systems), VxWorks5.4 (manufactured by Wind River), SCORE, DACS and TADS (all manufacturedby DDC-I), Nimble—the SoC RTOS (manufactured by Eddy Solutions), Nucleus(manufactured by Accelerated Technology), or Fusion RTOS (manufacturedby DSP OS, Inc.). In these embodiments the central processing unit 202may be replaced by an embedded processor, such as the Hitachi SH7000,manufactured by Kabushiki Kaisha Hitachi Seisakusho, of Tokyo, Japan orthe NEC V800, manufactured by NEC Corporation of Tokyo, Japan.

Referring back to FIG. 1, and in more detail, the modeling environment110 accepts input to create a model of the chemical or biochemicalreaction to be simulated. In some embodiments, the modeling environment110 accepts input contained in a file, such as a file in Systems BiologyMarkup Language (SBML). In others of these embodiments, the file may bein HyperText Markup Language (HTML) format, Extensible Markup Language(XML) format, a proprietary markup language, or a text file in whichfields are delimited by tabs or commas. Alternatively, the modelingenvironment 110 may accept input produced by a user via either acommand-line interface or a graphical user interface.

FIGS. 3A and 3B depicts an embodiment of a tabular graphical userinterface 300 that may be used to receive input manufactured by a userfor creating a model. As shown in FIGS. 3A and 3B, the user interfacemay include a model pane 302. In the embodiment shown in FIGS. 3A and3B, the model pane 302 lists one or more models in a tree structurefamiliar to users of computers operating under control of the WINDOWSoperating system, manufactured by Microsoft Corp. of Redmond, Wash. Inthe particular embodiment depicted by FIG. 3A, a single model of achemical reaction is contained in the model pane 302, indicated by thefolder labeled “FieldKorosNoyesModel”. That model contains threesubfolders: “Compartments”; “Reactions”; and “Species”. The subfoldersrepresent pieces of the modeled reaction. Other graphical user interfaceschemes may be used to present this information to the user of a system100. In some embodiments, the model pane 302 may display a number offolders representing models. User selection of a particular foldercauses the system to display folder in the model pane 302 that representpieces of the reaction, e.g., compartments, reactions, and species. Instill other embodiments, each model and all components of all models maybe displayed in the model pane 302 and each model may be associated witha “radio button,” Selection of the radio button associates with a modelcauses that model and its constituents to be actively displayed. In someof these embodiments, unselected models are displayed in grey type, ormay have a transparent grey overlay indicating that they are notcurrently the active model.

Referring back to FIG. 3A, the graphical user interface 300 alsoincludes a reaction table 310, and a species table 320. The reactiontable 310 is associates with the “Reactions” folder displayed in themodel pane 302. Similarly, the species table 320 is associated with the“Species” folder displayed in the model pane 302. In some embodiments,collapsing the associated folder causes the table to not be displayed.The respective tables may be displayed in their own graphical userinterface window, rather than in the same window as the graphical userinterface 300, as shown in FIG. 3A.

The reaction table 310 lists each reaction present in a modeledbiological process or chemical reaction. In the embodiment shown in FIG.3A, the modeling environment 300 displays reactions present in theField-Koros-Noyes model of the Belousov-Zhabotinsky reaction andincludes four columns: a reaction column 312, a kinetic law column 314,a parameter column 316, and a reversible column 318. Each row of thereaction table 310 corresponds to a particular reaction. The number andformat of columns displayed by the reaction table may be selected by theuser. In other embodiments, the modeling environment 110 may select thenumber and format of columns to display based on the type of reactionselected by the user.

Referring back to the embodiment shown in FIG. 3A, the reaction column312 displays a reaction represented in an abstract format, e.g., Ce->Br.In other embodiments, the reaction may be represented as a differentialequation, in stochastic format, or as a hybrid of two or more of theseformats. In some embodiments, the reaction table includes a columnidentifying modifiers of the reaction. For example, some reactions canbe catalyzed by a substance. This may be represented in the tabularformat as Ce-m(s)->Br, meaning that the presence of “s” causes Ce toconvert into Br.

In the embodiment shown in FIG. 3A, the reaction table 310 also includesa kinetic law column 314 which identifies the kinetic law expression theidentified reaction follows. In the embodiment shown in FIG. 3A, thekinetic law associated with the Ce->Br reaction is “Ce*k5,” meaning thatCe is consumed at a rate controlled by the parameter “k5” and the amountof Ce present. In the embodiment shown in FIG. 3A, the parameters forthe kinetic law expression are listed in the parameter column 316. Insome embodiments, the reaction table 310 includes a column identifyingthe name of the kinetic law associated with a particular reaction, e.g.“mass action” or “Michaels-Menten.” In other embodiments, the reactiontable 310 includes a column identifying the units in which the kineticlaw parameters are expressed, e.g., 1/seconds, 1/(moles*seconds), etc.

Still referring to the embodiment shown in FIG. 3A, the reaction table310 includes a reversible column 318, which indicates whether theassociated reaction is reversible. A reversible reaction is one whichoccurs in either direction, i.e. Ce<->Br. In some embodiments thereaction table 310 may include a column identifying dynamics of thereaction, e.g., “fast” or “slow.” In some of these embodiments, therapidity with which a reaction occurs is identified on a scale of 1 to10. In still other embodiments, the user may be presented with a slidecontrol that allows the rapidity of various reactions to be set relativeto one another. In still further embodiments, the reaction table 310 mayinclude a column for annotations or notes relating to the reaction.

The modeling environment 300 shown in FIG. 3A also displays a speciestable 320. In the embodiment shown in FIG. 3, the species table 320includes a name column 322, an initial amount column 324, and a constantcolumn 326. The species table depicts the initial conditions and amountsof material used in the modeled biological process or chemical reaction.Thus, in the embodiment shown in FIG. 3, the modeled biological processbegins with 0.003 molar units of bromine, i.e., 0.003 multiplied byAvrogado's number. The constant column 326 is set to “true” if the modelshould assume that there is an infinite supply of a particular species.In other embodiments the species table 320 includes other columns suchas a column identifying units (e.g., moles, molecules, liters, etc.),whether a particular species is an independent variable in the model(i.e., whether the species is an input to the system), a column forannotations, or a column for notes.

In some embodiments, the modeling environment 300 accepts as input afile in a markup language and converts that file into a graphicaldisplay of the sort depicted in FIG. 3A. For example, one representationof the Field-Koros-Noyes model of the Belousov-Zhabotinsky reaction inmarkup language that corresponds to the particular embodiment shown inFIG. 3A is shown in Appendix A to this document.

For example, a process may be provided that uses the informationembedded in the tags of the markup language file, e.g., <reactionname=“Reaction5” reversible=“false”>, to generate the tabular form ofthe model shown in FIGS. 3A and 3B. In some of these embodiments, a webbrowser may be modified to parse files containing models written inmarkup language in order to create the tabular form of the model shownin FIGS. 3A and 3B. In other embodiments, a process may accept the modelas input and generate as output code that is directly executable on aprocessor, such a code written in the C programming language.

Conversion of a model into executable code allows the executable code tobe transmitted to multiple computers via a network for execution onthose computers. In these embodiments computers may be connected via anumber of network topologies including bus, star, or ring topologies.The network can be a local area network (LAN), a metropolitan areanetwork (MAN), or a wide area network (WAN) such as the Internet. Andthe respective computers may connect to the network 180 through avariety of connections including standard telephone lines, LAN or WANlinks (e.g., T1, T3, 56 kb, X.25), broadband connections (ISDN, FrameRelay, ATM), and wireless connections. Connections can be establishedusing a variety of communication protocols (e.g., TCP/IP, IPX, SPX,NetBIOS, NetBEUI, SMB, Ethernet, ARCNET, Fiber Distributed DataInterface (FDDI), RS232, IEEE 802.11, IEEE 802.11a, IEE 802.11b, IEEE802.11g and direct asynchronous connections).

In these embodiments, a master server parses a model written in markuplanguage. The model may be retrieved from a hard disk or from anothercomputer accessed via a network connection. In other embodiments themodel is input by a user using a tabular user input such as the oneshown in FIGS. 3A and 3B or a graphical user interface such as the oneshown in FIG. 4. The master server parses the model to produceexecutable code. The executable code produced by the master server maybe compiled code, such as code written in C, C+, C++, or C# and compiledto run on a target platform or the executable code produced by themaster server may be a in a bytecode language such as JAVA. In someembodiments the executable code is transmitted to one or more computersvia a network connection. The one or more computers execute the coderepresenting the model and return the generated result to the masterserver. The master server may store the retrieved results for lateranalysis. In some embodiments the master server displays a graphicalrepresentation of each of the received results. In one embodiment, thistechnique is used to conduct Monte Carlo type analysis. In certain ofthese embodiments, the master server may collect and display each datapoint received and display each data point graphically in real-time.

FIG. 3B depicts in tabular form reactions for simulating the E. Coliheat shock response model. As described above in connection with FIG.3A, the upper table displays the various reactions involved intranscription and translation of the heat shock proteins as well as theinteractions of heat shock proteins with unfolded (or denatured)proteins. As depicted in FIG. 3B, all reactions have mass actionkinetics and some are reversible, while some are not. Another method ofrepresenting chemical or biochemical reactions is by way of a blockdiagram.

In still other embodiments, the modeling environment 300 allows a userto represent a biological process or chemical reaction as a blockdiagram. FIG. 4 depicts an embodiment of a block diagram modelingenvironment. In the embodiment depicted in FIG. 4, a block diagramshowing heat shock reaction in E. Coli bacteria is under construction.As is well known, heat shock response in E. coli is a protectivecellular response to heat induced stress. Elevated temperatures resultin decreased E. coli growth, in large part, from protein unfolding ormisfolding. The heat shock response, via heat shock proteins, respondsto heat induced stress by refolding proteins via chaperones or bydegrading nonfunctional proteins via proteases.

The block diagram shown in FIG. 4 depicts the expression of fiveparticular gene sequences involved in the heat shock response. In part,FIG. 4 depicts pathways 4100, 4200, 4300 for the expression of proteasesinvolved in heat shock response. Pathways 4100, 4200, 4300 represent theexpression of heat shock proteins ftsH, Hs1VU and other proteases,respectively. The pathways 4100, 4200, 4300 are activated by theinteraction 4105, 4205, 4305 of σ³² with RNA polymerase at the promoterof the respective sequence. Each pathway 4100, 4200, 4300 depicts thetranscription 4120, 4220, 4320 of the mRNA mediated 4110, 4210, 4310 bythe σ³² and RNA polymerase interaction 4105, 4205, 4305 at the promoterand the subsequent translation 4130, 4230, 4330 of the protease. Theheat shock proteases, including ftsH and Hs1VU, serve to degradeproteins rendered nonfunctional by heat stress. Similarly, the diagramdepicts the pathways 4400, 4500 involved in the expression of the heatshock proteins σ⁷⁰ and DnaK, respectively. The expression of the σ³²protein is activated 4410 by the interaction 4403 of σ⁷⁰ and RNApolymerase at the promoter. The σ³² mRNA is transcribed 4420 and,subsequently, σ³² is translated 4430. In a closely related pathway 4500,the heat shock protein DnaK is translated. The interaction 4505 of σ³²and RNA polymerase at the promoter activate 4510 the transcription 4520of DnaK mRNA and, subsequently, the translation 4530 of DnaK. DnaK, inturn, may either interact 4600 with σ³² so as to stabilize σ³² or,alternatively, may refold 4700 the proteins unfolded by heat stress.

A block diagram editor allows users to perform such actions as draw,edit, annotate, save, and print out block diagram representations ofdynamic systems. Blocks are the fundamental mathematical elements of aclassic block diagram model. In some of these embodiments, the modelingenvironment includes two classes of blocks, non-virtual blocks andvirtual blocks. Non-virtual blocks are elementary dynamic systems, suchas the σ³² and RNA polymerase interaction 4105, 4205, 4305. A virtualblock may be provided for graphical organizational convenience and playsno role in the definition of the system of equations described by theblock diagram model. For example, in the block diagram of the heat shockmechanism in E. Coli bacteria depicted in FIG. 4, gene transcriptionmediated by σ³² to produce proteins, represented by 4100, 4200, and4300, may be represented as a single, virtual block. Hierarchicalmodeling (such as the use of subsystems) may be used to improve thereadability of models.

In some embodiments, the meaning of a non-virtual block may be extendedto include other semantics, such as a “merge” block semantic. The mergeblock semantic is such that on a given time step its output is equal tothe last block to write to an input of the merge block. In tabulargraphical user interface embodiments, a merge block may be combined with“wild card” characters to expand a single table entry into multipleinstances of a reaction. For example, the reaction:*transcription_factor:RNAP −> gene −> mRNA −> protein

-   -   which uses *transcription_factor as a “wild card,” allowing        multiple protein expressions to be identified in a model using a        single line reaction. In general, any regular expression may be        used to signal the existence of a “wild card.” Regular        expressions, and the techniques used to compile a regular        expression into multiple instances of code, are well-known. The        transcription factors to be used by the model may be provided        from a database query, a file, or by user input at the time the        reaction is expanded to generate the executable model. Each        transcription factor that is provided results in a different        reaction that, potentially, causes a different gene to produce        messenger RNA and express a particular protein. This technique        may be used to produce sets of reactions with minimal input on        the user's part.

In still other embodiments, the modeling environment 300 may alsoprovide for conditional execution, which is the concept of conditionaland iterative subsystems that control when in time block methods executefor a sub-section of the overall block diagram.

The block diagram editor is a graphical user interface (GUI) componentthat allows drafting of block diagram models by a user. FIG. 4 depictsan embodiment of a GUI for a block diagram editor that features afloating element palette. In the embodiment shown in FIG. 4, the GUItools include various block tools 402, 404, 408, various wiring lineconnection tools 406, 412, an annotation tool 416, formatting tool 410,a save/load tool 414, a notification tool 420 and a publishing tool 418.The block tools 402, 404, 408 represent a library of all the pre-definedblocks available to the user when building the block diagram. Individualusers may be able to customize this palette to: (a) reorganize blocks insome custom format, (b) delete blocks they do not use, and (c) addcustom blocks they have designed. The blocks may be dragged through somehuman-machine interface (such as a mouse or keyboard) on to the window(i.e., model canvas). The graphical version of the block that isrendered on the canvas is called the icon for the block. There may bedifferent embodiments for the block palette including a tree-basedbrowser view of all of the blocks. In these embodiments, the floatingelement palette allows a user to drag block diagram elements from apalette and drop it in place on the screen. In some of these embodimentsthere may also be a textual interface with a set of commands that allowinteraction with the graphical editor. For example, dragging apolymerase block to the model may cause the system to prompt the userfor the protein to be used in the polymerase reaction.

Using this textual interface, users may write special scripts thatperform automatic editing operations on the block diagram. A usergenerally interacts with a set of windows that act as canvases for themodel. There can be more than one window for a model because models maybe partitioned into multiple hierarchical levels through the use ofsubsystems (discussed further below). In still other embodiments, only atextual interface may be provided for facilitating the user'sconstruction of the block diagram.

The wiring line connection tools 406, 412 allow users to draw directedlines that connect the blocks in the model's window. In some embodimentsa single wiring line tool is provided and the user connects blocks byselecting the tool, selecting a start point, and selecting the endpoint. In other embodiments, multiple connection tools may be present(such as the embodiment depicted in FIG. 4). Connections may be addedthrough various other mechanisms involving human-machine interfaces suchas the keyboard. The modeling environment 300 may also provide variousforms of auto-connection tools that connect blocks automatically on userrequest to produce an aesthetically pleasing layout of the block diagram(especially those with high complexity with large numbers of blocks).Connection of one block to another signifies that the speciesrepresented by the first block, or the output of that block if itrepresents a transaction, is an input to the second block.

The annotation tool 416 allows users to add notes and annotations tovarious parts of the block diagram. The annotations may appear in anotes or annotation column when the model is viewed in a tabular format.When viewed in graphical format, the notes may appear close to annotatedblock or they may be hidden.

The formatting tool 410 enables users to perform various formattingoperations that are generally available on any document editing tool.These operations help pick and modify the various graphical attributesof the block diagram (and constituent blocks) such as includefont-selection, alignment & justification, color selection, etc. Theblock diagram and all the blocks within the block diagram generally havea set of functional attributes that are relevant for the execution orcode-generation. The attribute editing tool provides GUIs that allowsthese attributes to be specified and edited.

The save/load tool 414 allows a created block diagram model to be saved.The saved model can be reopened in the editor at some later juncturethrough a load mechanism. Users may save blocks includingpre-constructed subsystems into a separate class of block-diagramscalled libraries. Such libraries facilitate reuse of the same block in anumber of other block-diagrams. The load/save mechanism is speciallyequipped to handle loading and saving of blocks in a block-diagram thatactually reside in libraries.

A publishing tool 418 may be provided to enable the viewing of the blockdiagram as a document that can be published in any standard documentformats (examples: PostScript, PDF, HTML, SBML, XML, SGML, SBML etc.).Those skilled in the art will recognize that the windows for multiplemodels and all of the tools mentioned above could potentially beembedded in a single Multi-Document Interface (MDI) for providing aunified software environment.

A notification tool 420 allows a user working on a block diagram to senda message to another user. In some embodiments, the notification tool420 causes the current version of the block diagram, to be mailed to thespecified user.

Those skilled in the art will also recognize that block-diagram packagesoffer scripting languages for writing out programs that automaticallycarry out a series of operations that would normally require interactionwith the GUI, such as block addition, block deletion, starting andterminating execution, or modifying block attributes, etc.

The modeling environment 300 may also offer a variety of other GUI toolsthat improve the ability of users to build and manage large blockdiagrams. Examples of such GUIs include: (a) a Finder that helps findvarious objects such as blocks and lines within a block-diagram, (b) aDebugger that helps debug the execution of block-diagrams, (c) aRevision Control UI for managing multiple revisions of theblock-diagram, and (d) a Profiler for viewing timing results whileexecuting a block-diagram.

A typical base data-structure for a block may be represented as: classBlock {  public: // Access methods for setting/getting block data . . .// Methods for block editing virtual ErrorStatus BlockDrawIcon( );virtual BlockParameterData BlockGetParameterData( ); . . . // Methodsfor block compilation . . . // Methods for block execution . . . . . . .. . . . . . . . . . . . . . . . . virtual ErrorStatus BlockOutput( ) =0; virtual ErrorStatus BlockDerivative( ) = 0; virtual ErrorStatusBlockUpdate( ) = 0; . . .  private: BlockGraphicalDatablkGraphicalAttributes; BlockFunctionalData blkFunctionalAttributes;BlockCompiledData blkCompiledAttributes; BlockExecutionDatablkExecutionData; . . . };

-   -   Although the example of the data structure above is written in        C++, those skilled in the art will recognize that equivalent        data structures written in other languages may also be used. The        major data fields of the block data structure fall into four        categories, a graphical attributes field, a functional        attributes field, a compiled attributes field and an execution        data field.

The graphical attributes field is responsible for storing informationrelevant for graphical rendering of the block within its parent blockdiagram's GUI. Attributes specific to the block icon such as font,color, name, and icon-image are stored in this field. It should be notedthat modifying these attributes does not affect the dynamics of themodel using this block. The functional attributes field is responsiblefor specifying block attributes that may potentially affect the dynamicsof the model using this block. These attributes are specified for theblock as a whole and the input and output ports of the block. Examplesof block attributes include block sample times and restrictive flags.Block sample times specify if the block corresponds to an elemental,continuous, discrete, or hybrid dynamic system. If the block is anelemental discrete-time system, then the attribute specifies the spacingbetween time instants at which the block response should be traced. Arestrictive flag disallows the use of blocks in certain modelingcontexts. For example, one may impose the restriction that there mayonly be one instance of given block in a model.

Attributes of block ports specify properties of the data that is eitheravailable or produced at that port. Block port attributes includedimensions, datatypes, sample rates, and direct feedthrough. Dimensionattributes are individual dimensions of a multi-dimensional matrix thatis used as a container for data elements. Datatype attributes are thedatatype of each element of data in the data container. A complexityattribute is a flag to specify if each data element is real or complex.A sample rate attribute specifies how when the signal corresponding toan input or output port will be used. The port sample times maysometimes be used to implicitly infer the block's sample time. Thedirect feedthrough attribute is specified only for input ports andindicates whether or not the Output equations of the block are afunction of the given input. This attribute helps in determining thesequence in which block methods should be executed while executing theblock diagram.

The compiled attributes field of the block data structure holds theattributes of the block and its ports that mirror the functionalattributes listed above. This field is filled in during block diagramcompilation by utilizing the functional attributes of the block inconjunction with the functional and compiled attributes of the blocksthat are connected to it. This process of determining the compiledattributes manufactured by the functional attributes is termed attributepropagation. Attribute propagation is described in greater detail belowin the section on block diagram compilation. The execution data field ismainly responsible for storing the memory locations that are going toserve as sources for block inputs, outputs, states, parameters, andother work areas during execution of blocks.

The block data structure also has a set of associated methods that maybe categorized as access methods to data fields, methods used inediting, methods used in compilation and methods used in execution.Access methods to data fields help in setting and getting the variousdata fields of the block. Methods used in editing are called by theblock diagram editor in order to render the block appropriately in theGUI of its parent block diagram. For instance, this set of methods mayinclude a BlockDrawIcon method that determines the shape the block iconhas on the GUI. Methods used in compilation are methods that are calledby the block diagram compilation engine. They help validate theconnections of the block to other blocks on the block diagram. Themethods used in execution include a number of different run-time methodsthat are required for execution. These include the BlockOutput,BlockUpdate, BlockDerivative methods that realize the Output, Update,and Derivative equations discussed earlier in the context of dynamicsystems. In addition to these methods several other run-time methods maybe provided, such as the Jacobian, Projection, ZeroCrossings, Enable,Disable, Initialize, EvalParams (check and process parameters), andGetTimeOfNextHit methods. It should be noted that there is no explicitmethod for algebraic equations because these are represented andprocessed in a different manner which will be discussed below inconnection with the discussion of the simulation engine 120.

In some embodiments, the modeling environment 110 includes a knowledgebase 350 that aids construction of a model. In some of theseembodiments, the knowledge base 350 contains models for variousreactions, e.g. glycolysis. In these embodiments, when a user begins toinput reactions consistent with a model for glycolysis, the knowledgebase 350 may enter the remaining reactions for the user. Alternatively,the knowledge base 350 may offer different models of the reaction to theuser. In some of these embodiments, the offered models represent thetarget reaction with varying levels of detail. In other embodiments, theknowledge base 350 may insert parameters or indications of reversibilityfor entered reactions. The knowledge base 350 may also provideassistance to a user inputting a block diagram representation of achemical or biochemical reaction. For example, the knowledge base 350may prevent a user manufactured by connecting blocks inconsistent withthe modeled reaction. Examples of publicly-available databases that maybe used to facilitate generation of models include the Swissprotdatabase (http://us.expasy.org/sprot), NCBI(http://www.ncbi.nlm.nih.gov), the Protein Data Bank(http://www.rcsb.org/pdb), and KEGG(http://www.genome.ad.ip/kegg/kegg2.html). Alternatively, the user mayprovide private databases to act as a knowledge base 350 forfacilitating creation of models.

Blocks in a block diagram may be virtual or non-virtual. The designationof a block as non-virtual indicates that it influence the equations inthe mathematical model for the dynamic system. In the context of blockdiagram software, it is beneficial to include other virtual blocks thatdo not affect the equations in the dynamic system's model. Such blockshelp improve the readability and modularity of the block diagram andwield no semantic influence on the mathematical model. Examples of suchvirtual blocks include virtual subsystems, inport blocks and outportblocks, bus creator blocks and From and Goto blocks.

Modularity may be achieved in a block diagram by layering the blockdiagram through the use of subsystems. A subsystem facilitates layeringby allowing a collection of blocks to be represented by a single blockwith input and output signals. The input and output signals of thesubsystem are accessible to the constituent blocks within the subsystem.A subsystem is a virtual subsystem if its constituent blocks are movedback into the main block diagram model during the model's execution.Within a virtual subsystem graphical entities, called inport and outportblocks, are provided to define signal connections to the parent blockdiagram. These inport and outport blocks indicate a tunnel-throughsignal connection to the parent block diagram.

As noted previously, to facilitate modeling fairly large and complexdynamic systems, users may be allowed to layer block diagrams. Asubsystem facilitates such layering by allowing a collection of blocksto be represented by a single block with input and output signals. Theinput and output signals of the subsystem are accessible to itsconstituent blocks. By nesting subsystems within each other, one cancreate block diagrams with arbitrary layers of hierarchy. Ideally asubsystem has no impact on the meaning of the block diagram.Additionally, subsystems provide a way of grouping blocks together andallowing other block diagram constructs to impose unified control on theconstituent blocks. To enhance the modularity of subsystems, modelingsoftware also allows aggregated list(s) of parameters of the blockswithin the subsystem to be accessed from a single GUI, and defines anddisplays special icons on the subsystems. The process of defining theparameter list and the special icon is called masking a subsystem.

There are two main types of subsystem blocks, virtual subsystems andnon-virtual subsystems. Virtual subsystems serve the purpose ofproviding the block diagram with a graphical hierarchy. Non-virtualsubsystems behave like an elemental dynamic system with its ownexecution methods (Output, Update, Derivatives, etc.). These executionmethods in turn call the execution methods of the constituent blocks.

The classes of non-virtual subsystems are:

-   Atomic subsystems. These are similar to virtual subsystems, with the    advantage of grouping functional aspects of models at a given layer.    This is useful in modular design.-   Conditionally-executed subsystems. These are non-virtual subsystems    that execute only when a precondition is fulfilled:-   Enabled subsystems. These are similar to Atomic subsystems, except    that the constituent blocks only execute when an enable signal    feeding the subsystem is greater than zero.-   Triggered subsystems. These are similar to Atomic subsystems, except    that the constituent blocks only execute when a rising and/or    falling signal is seen on a triggering signal feeding the subsystem.-   Enable with Trigger subsystems. These are an intersection of the    properties of Enabled and Triggered subsystems.-   Action subsystems. These subsystems are connected to    action-initiator (e.g., an “If” or “SwitchCase” block), a block that    explicitly commands the subsystem contents to execute. These    subsystems are similar to Enabled subsystems except that the    management of the “enabling” signal has been delegated to an    action-initiator. Action subsystems define a new type of signal,    called an action signal that signifies which subsystems are    commanded to execute by the action-initiator.-   Function-call subsystems. These subsystems provide a means of    collecting blocks into a subsystem that is only executed when called    by an owner block. The owner block may compute input signals for the    subsystem before calling the subsystem. Additionally, the owner may    also read output signals from the subsystem after calling it.    Function-call subsystems define a new type of execution control    signal, called a function-call signal that contains no data. It is    used to define the execution relationship between the owner block    and the function-call subsystem. Function-call owners may also    designate themselves as an “interrupt” source. In simulation, they    simulate the effects of an interrupt and in code generation they can    attach themselves to an (asynchronous) interrupt.-   While subsystems and For subsystems. These subsystems execute the    constituent blocks multiple times on a given time step.

In other embodiments the knowledge base 350 may be used to facilitatefurther or broader understanding of the modeled reaction. For example,referring to the block diagram representation of the heat shock reactionin E. Coli bacteria, the knowledge base 350 can be used to identifyother reactions in the heat shock reaction that use, or are impacted by,σ70. Alternatively, the knowledge base 350 may identify other reactionsfor E. Coli in which σ70 plays a part, e.g., chemotaxis. In this way, abroader understanding of the functioning of E. Coli in variousenvironments can be achieved.

In still other embodiments the modeling environment 110 provideslibraries from which blocks may be selected and included in a model.Models referenced by virtual or non-virtual blocks in a model, whetheror not part of a library, are included in the model for execution. Forembodiments in which executable code is generated, code representing thereferenced models is also generated.

Virtual subsystems serve the purpose of providing the block diagram witha graphical hierarchy. Non-virtual subsystems behave like an elementaldynamic system with its own execution methods (Output, Update,Derivatives, etc.). These execution methods in turn call the executionmethods of the constituent blocks.

Once a block diagram model has been constructed, model execution iscarried out over a user-specified time span for a set of user-specifiedinputs. The execution begins when the block diagram is compiled. Thecompile stage marks the start of model execution and involves preparingdata structures and evaluating parameters, configuring and propagatingblock characteristics, determining block connectivity, and performingblock reduction and block insertion. The preparation of data structuresand the evaluation of parameters create and initialize basicdata-structures needed in the compile stage. For each of the blocks, amethod forces the block to evaluate all of its parameters. This methodis called for all blocks in the block diagram. If there are anyunresolved parameters, execution errors are thrown at this point. Duringthe configuration and propagation of block and port/signalcharacteristics, the compiled attributes (such as dimensions, datatypes, complexity, or sample time) of each block (and/or ports) aresetup on the basis of the corresponding functional attributes and theattributes of blocks (and/or ports) that are connected to the givenblock through lines. The attribute setup is performed through a processduring which block functional attributes “ripple through” the blockdiagram from one block to the next following signal connectivity. Thisprocess (referred to herein as “propagation”), serves two purposes. Inthe case of a block that has explicitly specified its block (or itsports') functional attributes, propagation helps ensure that theattributes of this block are compatible with the attributes of theblocks connected to it. If not, an error is issued. Secondly, in manycases blocks are implemented to be compatible with a wide range ofattributes. Such blocks adapt their behavior in accordance with theattributes of the blocks connected to them. This is akin to the conceptof polymorphism in object-oriented programming languages. The exactimplementation of the block is chosen on the basis of the specific blockdiagram in which this block finds itself. Included within this step areother aspects such as validating that all rate-transitions within themodel yield deterministic results and that the appropriate ratetransition blocks are being used. The compilation step also determinesactual block connectivity. Virtual blocks play no semantic role in theexecution of a block diagram. In this step, the virtual blocks in theblock diagram are optimized away (removed) and the remaining non-virtualblocks are reconnected to each other appropriately. This compiledversion of the block diagram with actual block connections is used fromthis point forward in the execution process. The way in which blocks areinterconnected in the block diagram does not necessarily define theorder in which the equations (methods) corresponding to the individualblocks will be solved (executed). The actual order is partiallydetermined during the sorting step in compilation. Once the compilationstep has completed, the sorted order cannot be changed for the entireduration of the block diagram's execution.

Following the compilation stage, is the model link stage which may alsoproduce linear models. After linking has been performed, code may or maynot be generated. If code is generated, the model is simulated/executedthrough accelerated simulation mode in which the block diagram model (orportions of it) is translated into either software modules or hardwaredescriptions (broadly termed code). If this stage is performed, then thestages that follow use the generated code during the execution of theblock diagram. If code is not generated, the block diagram may executein interpretive mode in which the compiled and linked version of theblock diagram may be directly utilized to execute the model over thedesired time-span. This interpretive mode of execution is suitable forgetting fine-grained signal traceability. There are several differentadvantages to execution through code generation. Execution of generatedcode can be more efficient than interpretive execution because of fewerdata-structures and lesser internal messaging in the engine, althoughthe increased efficiency generally comes at the cost of decreasedexecution traceability. Simulation of hardware descriptions duringexecution can help identify and resolve bugs in the software stage of adesign project. Such bugs prove much more expensive to track and fixonce the system has been implemented in hardware. Additionally, blockdiagram modeling software can be integrated with other softwareenvironments that are suitable for modeling and simulating specialclasses of systems. Models can be tested directly in hardware therebymaking prototyping of new systems fast and cost-effective. Those skilledin the art will recognize that when users generate code, they may chooseto not proceed further with the block diagram's execution. They maychoose to take the code and deploy it outside of the confines of themodeling software environment. This is normally the last step in thedesign of dynamic systems in a block diagram software package.

In one particular embodiment the modeling environment 110 provides atool allowing a user to select the complexity with which a modelexecutes. Referring back to FIG. 4 as an example, a user can be providedwith a choice of executing pathway 4100 as a simple input-output blockor executing pathway 4100 in the more detailed form shown in FIG. 4.

Referring back to FIG. 1, the model created in the modeling environment110 can be used by the simulation engine 120. Dynamic systems, such asbiological processes and chemical reactions, are typically modeled assets of differential, difference, algebraic, and/or recursive equations.At any given instant of time, these equations may be viewed asrelationships between the system's output response (“outputs”), thesystem's input stimuli (“inputs”) at that time, the current state of thesystem, the system parameters, and time. The state of the system may bethought of as a numerical representation of the dynamically changingconfiguration of the system. For instance, in a physical system modelinga simple pendulum, the state may be viewed as the current position andvelocity of the pendulum. Similarly, a signal-processing system thatfilters a signal would maintain a set of previous inputs as the state.The system parameters are the numerical representation of the static(unchanging) configuration of the system and may be viewed as constantcoefficients in the system's equations. For the pendulum example, aparameter is the length of pendulum and for the filter example; aparameter is the values of the filter taps. A simulation engine usefulin connection with the present invention is Simulink, available from TheMathWorks, Inc. of Natick, Massachusetts.

The present system adds a fifth type of mathematical model, stochasticmodels, to the types of mathematical models used in the study of dynamicsystems: differential equations; difference equations; algebraicequations; and hybrid models. The first type of mathematical modeldescribes systems using ordinary differential equations (ODEs) and isdepicted in FIG. 5A. The dynamic system 502 specifies a set of twoequations: Output 504 and Derivative 506. The Output equation 504facilitates the computation of the system's output response at a giventime instant as a function of its inputs, states, parameters, and time.The Derivative equation 506 is an ordinary differential equation thatallows the computation of the derivative of the states at the currenttime as a function of the inputs, the states, parameters, and time. Thisclass of models is suitable for systems in which it is important totrack the system response as a continuous function of time. Suchcontinuous-time systems are commonly representative of physical systems(mechanical, thermal, electrical) however, they may also be useful forchemical and biochemical reactions such as intracellular biochemicalreactions. For example, continuous-time systems can be useful inmodeling cellular metabolism while stochastic systems can be used tomodel cellular regulatory systems such as DNA transcription. For simplesystems, it may be possible to use the Output 504 and Derivativeequations 506 to obtain a closed-form solution for the output responsey(t). But in most complex real world systems, the response of the systemis obtained by integrating the states through numerical means.

The definition of an ODE used herein encompasses both implicit andexplicit differential equations. The class of ordinary differentialequations may require additional equations to define the system beingmodeled. For example, equations called projections may be required toimpose constraints on the differential variables (e.g., states X₁ and X₂must fall on the manifold defined by x₁ ²+x₂ ²=25). These constraintscan be applied as a coupled condition to the differential equation.Although systems including the projections may conventionally no longerqualify as an ODE; they are included here as differential algebraicequations to simplify the categories of systems. Another example is theuse of a Jacobian equation that defines partial derivatives with respectto the independent and/or differential variables. The Jacobian equationis typically used when obtaining a linear approximation of a non-linearmodel or an overall linear model of a set of equations. Jacobianequations are required for some forms of numerical integration, forproducing the linear model once the model has reached its steady stateoperating point, etc. The Output 504 and Derivatives equations 506 maybe extended to define other relationships for the block. For example,the Output equation 504 may help manage its states by defining arelationship where it resets the state back to a known quantity at aspecific point in time or when a specific condition is seen. Jacobiansmay also be used to perform Sensitivity Analysis of a modeled system.Sensitivity analysis identifies the variable critical to the system'sbehavior.

Another type of mathematical model describes systems using differenceequations as depicted in FIG. 5B. The dynamic system 508 specifies a setof two equations: Output 510 and Update 512. The Output equation 510facilitates the computation of the system's output response at a giventime instant as a function of the inputs, states at some previous time,parameters, and time. The Update equation 512 is a difference equationthat allows the computation of the states at the current time as afunction of the inputs, states at some previous time, parameters, andtime. This class of models is suitable for systems in which it isimportant to track the system response at discrete points in time. Suchdiscrete-time systems are typically representative of discrete-timecontrol and digital signal processing systems. For simple systems, itmay be possible to use the Output 510 and Update equations 512 to obtaina closed-form solution for the output response y(t). But in most complexreal world systems, the response of the system is solved throughrecursion. The Output 510 and Update equations 512 are appliedrepeatedly to solve for the system response over a period of time. Anadditional type of mathematical model describes systems using algebraicequations as depicted in FIG. 5C. The dynamic system 514 uses analgebraic equation 516 that needs to be solved at each time to obtainthe outputs. While simple systems may allow one to obtain a closed-formsolution for the system inputs and outputs, practical algebraicequations may best be solved iteratively using a numerical methodinvolving both perturbations and iterations. Algebraic equation solvingtechniques used in the context of dynamic system modeling are discussedin greater detail below.

For modeling biological processes and chemical reactions, an additionalmodel is useful. This model describes systems using stochastictechniques, such as Gillespie, Gibson/Bruck, and 1-leaping. Thesetechniques are useful when the continuous approximation implied byODE/DAE systems is not applicable. This may be the case when dealingwith small molecule counts, such as RNA polymerase binding to DNA totranscribe a particular gene. An example of a chemical equation thatcould be treated stochastically is shown in the reactions table of FIG.3B, e.g., s32+Dnak->s32:Dnak. This equation indicates that one moleculeof s32 bonds with one molecule of Dnak. When simulated stochastically,this reaction occurs at a random time determined according to aprobability distribution that depends on reaction kinetics. Variousprobability distributions may be used to determine when the reactionoccurs, such as exponential distributions, binomial distributions, Fdistributions, frequency distributions, geometric distributions,hypergeometric distributions, multinomial distributions, negativebinomial distributions, percentage distributions, percentage cumulativedistributions, Poisson distributions, posterior distributions, priordistributions, t distributions and normal distributions. In otherembodiments, the user may define a probability distribution to use whendetermining the time value for the occurrence of a stochastic reaction.

A fifth type of mathematical model is a composite system that hascomponents that fall into the four types of models discussed above. Mostcomplex real-world system models fall into this category. This class ofsystems has Output, Derivative, Update, and potentially other equations.Solving for the output response of such systems requires a combinationof the solution approaches discussed for all of the classes above. Oneexample of a composite system is one described by differential-algebraicequations (DAEs) which contain both differential equations and algebraicequations. Of particular interest in biochemical models is a hybridapproach that contains both stochastic and deterministic equations,which allows for the solving of both metabolic and regulatory systems inthe same model.

Grouped within the composite class of systems are many extensionsinvolving relationships (equations) defined in terms of both outputs andstate. For example, one can define a limited integration relationshipfor a differential variable. This relationship requires a set ofequations that consists of the Output equation, an Update equation, aDerivative equation, and a Zero Crossing equation. The Zero Crossingequation defines the points in time where the upper and lower limits ofthe limited integration occur. Another example of an extension is thenotion of Enable and Disable equations that define relationships amongstates or signals when parts of a system are activated and deactivatedduring execution.

Inherent in four of the classes of systems (ODE, difference equations,algebraic equations and composite) is the notion of system sample time.The sample-time is the time interval at which the inputs, state, oroutputs (collectively referred to as the results) of the system aretraced as time progresses. Based on sample times, a system can bedescribed as a discrete-time system, continuous-time system and hybridsystem. As noted above, stochastic systems occur at a random timedetermined by an operative probability distribution.

A discrete-time system is a system in which the evolution of the systemresults is tracked at finite intervals of time. In the limit as theinterval approaches zero, the discrete-time system becomes acontinuous-time system. The intervals of time may be periodic ornon-periodic. Sometimes, non-periodic rate systems, such as stochasticsystems, are referred to as non-uniform rate systems meaning that thereis no periodic rate at which the response can be tracked. Acontinuous-time system is a system in which the evolutions of the systemresults are continuously changing. Continuous-time signals change duringnumerical integration. An example of a continuous-time system is onedescribed by an ODE. There can also be algebraic or compositecontinuous-time systems. A hybrid system is a system with bothdiscrete-time and continuous-time elements.

If a system has only one sample time, it is said to be single-rate. If asystem has multiple sample times, it is said to be multi-rate.Multi-rate systems can be evaluated (executed) using either asingle-tasking form of execution or a multi-tasking form of execution.When multi-tasking execution is used, it conforms to rate monotonicscheduling principals as defined by Liu, C. L., and LAYLAND, J. W.Scheduling Algorithms for Multiprogramming in a Hard-Real-TimeEnvironment. ACM 20, 1 (January 1973), 46-61. Systems may also becategorized by the type of numerical integration solver being used. Afixed-step system is one that uses a fixed-step solver. Fixed-stepsolvers typically use explicit methods to compute the next continuousstate at fixed periodic intervals of time. A variable-step system is onethat is using a variable-step solver. A variable-step solver can useeither implicit or explicit methods to compute the next continuous stateat non-periodic intervals of time. Generally, variable-step solvers usea form of error control to adjust the interval size such that thedesired error tolerances are achieved.

In practice, except for the most basic systems, mathematical models fordynamic systems involve a complex set of mathematical transformationsapplied in some prescribed manner with the outputs of sometransformations forming the inputs of others. Each elementaltransformation may be viewed in isolation as a simple dynamic systemfalling into one of the categories listed above. Therefore, a complexdynamic system may be modeled as an interconnection of various simpledynamic systems. A schematic representation of such an interconnectionthat has evolved over the years is the block diagram. Such block diagrammodels have now become a standard means in textbooks, design papers,journal articles, and specifications to communicate the details of adynamic system's behavior.

A block diagram model of a dynamic system is represented schematicallyas a collection of blocks interconnected by lines that represent theinput and output of a dynamic system. Each block represents an elementaldynamic system. A line emanating at one block and terminating at anothersignifies that the second block is a product of the first block. Thoseskilled in the art will recognize that the term “blocks” does not referexclusively to elemental dynamic systems but may also include othermodeling elements that aid in readability and modularity of blockdiagrams.

The theory of Digital Signal Processing (DSP) focuses on modelingsignals as sequences of samples. This view naturally fits into thetime-based block diagram paradigm by mapping the samples u[n] todiscrete-time points U(t_(k)). This adds the benefit of being able tomodel the interaction between DSP systems and other classes oftime-based systems, e.g. continuous and/or discrete-time controlsystems.

Put another way, block diagram models are time-based relationshipsbetween signals and state variables representative of a dynamic system.The solution (computation of system response) of the model is obtainedby evaluating these relationships over time, where time starts at auser-specified “start time” and ends at a user-specified “stop time”.Each evaluation of these relationships is referred to as a time step.Signals represent quantities that change over time, and these quantitiesare defined for all points in time between the block diagram's start andstop time. The relationships between signals and state variables aredefined by sets of equations represented by blocks. These equationsdefine a relationship between the input signals, output signals, state,and time. Inherent in the definition is the notion of parameters, whichare the coefficients of the equations.

It is important to note that block diagrams are not exclusively used forrepresenting time-based dynamic systems but also for other models ofcomputation. For instance, flow-charts are block diagrams used tocapture process flow and are not generally suitable for describingdynamic system behavior. Data flow block diagrams are block diagramsthat describe a graphical programming paradigm where the availability ofdata (often thought of as tokens) is used to initiate the execution ofblocks, where a block represents an operation and a line representsexecution dependency describing the direction of data flowing betweenblocks. As used herein, the term block diagrams means time-based blockdiagrams used in the context of dynamic systems except as otherwisenoted.

A block diagram execution engine contributes to the modeling softwaretask of enabling the computation and tracing of a dynamic system'soutputs manufactured by its block diagram model. An execution enginecarries out the task of compiling and linking the block diagram toproduce an “in-memory executable” version of the model that is used forgenerating code and/or simulating or linearizing a block diagram model.Execution of the block-diagram is also referred to as simulation. Thecompile stage involves checking the integrity and validity of the blockinterconnections in the block diagram. In this stage, the engine alsosorts the blocks in the block diagram into hierarchical lists that areused when creating the block method execution lists. In the link stage,the execution engine uses the result of the compiled stage to allocatememory needed for the execution of the various components of the blockdiagram. The linking stage also produces block method execution listswhich are used by the simulation or linearization of the block diagram.Included within the link stage is the initialization of the model whichconsists of evaluating “setup” methods (e.g. block start, initialize,enable, and constant output methods). The block method execution listsare generated because the simulation and/or linearization of a modelmust execute block methods by type (not by block) when they have asample hit.

After linking has been performed, the execution engine may generatecode. In this stage, the execution engine may choose to translate theblock diagram model (or portions of it) into either software modules orhardware descriptions (broadly termed code). If this stage is performed,then the stages that follow use the generated code during the executionof the block diagram. If this stage is skipped completely, then theexecution engine uses an interpretive mode of execution for the blockdiagram. In some cases, the user may not proceed further with theexecution of the block diagram because they would like to deploy thecode outside the confines of the block diagram software. Upon reachingthe simulation stage, the execution engine uses a simulation loop toexecute block methods in a pre-defined ordering upon a sample hit toproduce the system responses they change with time.

Determination of putative reaction times relies on the size of timeintervals chosen for the simulation. In order to understand how the stepsize is picked, it is first necessary to understand the notion of asolver. The solver is a module of the simulation engine 120 that isresponsible for performing two tasks: (a) determining how far executiontime should be advanced between consecutive passes in order toaccurately trace the system's outputs, and (b) integrating thederivative of the states of the system to obtain the actual states.Based on how solvers perform the first task, they are generallyclassified into two basic classes: fixed-step solvers or variable-stepsolvers.

Fixed-step solvers are solvers in which the time step-size betweenconsecutive passes is a fixed quantity. The user generally explicitlyspecifies this quantity. These solvers are used to model types ofsystems that must operate within a defined time (discrete systems). Forinstance, an anti-lock braking system may be designed to control a car'sbraking system, and to execute such control in one-one hundredth (0.01)of a second so as to assure the car stops safely; if the braking systemdoes not meet its timing constraints, the car may crash. Fixed-stepsolvers, therefore, are designed to help model discrete systems thathave to generate a result in a fixed time period, and the fixed-stepexecution assures that the modeled system can generate such results.Some reactions may be defined as having a discrete sample time, in whichcase the value of the reaction could be calculated at fixed intervalsusing a fixed-step solver.

However, some reactions are defined to be a continuous-time system. Forthese reactions, event scheduling occurs at time intervals that aredetermined by the simulation engine to minimize accumulation of errors.These reactions require use of variable-step solvers, which are designedto model continuous systems where non-evenly spaced time steps areneeded to simulate all significant behavior. For example, one may wantto simulate the path of a bouncing ball, where it bounces, how high itbounces, and where it stops. It is known, based on experience, that theball's bounces will not be evenly spaced, and that the height of thebounces will diminish as a result of gravity, friction, and otherforces. Variable-step solvers are used for these types of continuoussystems and to determine what step size to use so that the behavior ofthe ball will be accurately modeled.

In still other embodiments, reactions that are considered “fast” by themodel are assumed to have completed at “zero time,” which effectivelymeans that they are treated throughout model simulation as a constanthaving the value of the final result.

As noted previously, stochastic reactions occur at a random time basedon an operative probability distribution, which do not neatly fit eithertype of solver. In order to adequately model systems includingstochastic reactions, either alone or as part of a hybrid systemincluding both stochastic and either fixed-solver elements orvariable-solver elements, the following steps may be taken.

The simulation determines putative times for each reaction in the model(step 602). Once putative reactions times are computed for each reactionin the system, the times are sorted, by putative occurrence time, into astate array (step 604). In one embodiment, the state array is an arrayof pointers sorted by occurrence time, each of the pointers pointing tothe object to be executed at that point in model simulation. Oncesorted, the object identified by the first entry in the array isexecuted (step 606).

Because execution of the top object may affect the amount of speciespresent in the modeled system or the putative reaction times forspecific reactions in the table, the putative time for each of theentries in the state array is recalculated (step 608) and the statearray is resorted (step 610).

The simulation engine 120 checks for additional reactions to execute(step 614). If additional reactions exist, the simulation engine 120checks to determine in the final simulation time has been reached (step616). If not, the simulation engine 120 executes the next entry in thestate array (step 606). Otherwise, the simulation terminates. One ofordinary skill the art would recognize that other schedulingmethodologies may be used.

In one embodiment the simulation engine 120 provides a mechanism forstoring the entire simulation context, and a mechanism for restoring theentire simulation context. In one aspect of the present invention,before simulation is started, a flag is set in the modeling environment110 instructing the simulation environment 120 to store simulationcontext when the simulation finishes (either because the final time isreached, simulation was interrupted by the user, or otherwise).Alternative procedures for querying whether the context should be storedor not may also be implemented (e.g., user interaction when a simulationis finished). Once the simulation finishes, the simulation context maybe stored as a file, in a workspace parameter, or in some other format.

In one embodiment, the simulation context is stored to file. The fileinto which the simulation context is stored may be automatically named.However, a user-defined file may be used alternatively. The storagemechanism for saving the simulation context can vary from saving thecontext as memory dump, to saving the context memory as a platformindependent textual dump through a conversion process. As long as thereare no architectural incompatibilities between computer architecturesinvolved there will be no differences in the results. Otherimplementations such as saving the context as a platform independentbinary dump or a platform dependent textual dump are also within thescope of the present invention.

The user interface of the context restoration is achieved by startingthe simulation with a corresponding ‘continue simulation’ command. Thismay be implemented as a parameter for the normal means to triggersimulation or any other way. A continued simulation takes as argumentsall arguments (mandatory and optional) of an initial simulation such asfinal time and additional output times.

To store simulation context, a ‘StoreSimulationContext’ flag may be setin the simulation engine 120 or it may be communicated to the simulationengine 120 by the analysis environment 130. Other implementations, suchas using graphical elements in the modeling environment 110, may be usedinstead or in addition to the use of a flag. Additionally, contextstorage can be an activity that occurs during simulation (i.e., withoutinterrupting a regulation simulation). To this end, the user may specifyparticular storage conditions (e.g., when a certain point in time isreached in simulation such as the achievement of a steady state or whenparticular values of model variables exist). This could result in asequence of simulation context files with snapshots of the simulationcontext over the course of a simulation run.

In one embodiment, the simulation engine 120 registers areas of memorythat constitute the simulation context, and subsequently calls aprocedure to store and restore the simulation context. In oneembodiment, the simulation context related areas in memory areregistered before a simulation is started. This is implemented byrerouting the general memory allocation call through a registrationmechanism. A complication in storing and restoring the simulationcontext arises when aggregate variables mix references and values. Toillustrate this, consider the attributes of a Runge-Kutta 45 solver. Inits C++ implementation, the class RK45 is derived from VarStepSolver.The attributes of RK45 are RK45 double t0; double *x0; double t1; double*x1; double h; double *dX[7]; bool projectInterpolant; static const intid; static const double power;The definition reveals that an instance of RK45 contains valueattributes and reference attributes. The references contain pointersspecific to the particular simulation and they may differ betweensimulation runs. So, restoring these may result in invalid references,and, therefore, these should be excluded. FIG. 7 depicts part of theallocated memory 770 for an instance of RK45. The allocated memoryincludes value fields 772, 774, 776, 778, 780, 782 and 784 and referencefields 786, 788, 790 and 792.

Two basic approaches exist for tracking the simulation context memoryallocations. A localized indexing scheme tracks the pertinent variablesof an object that is part of the context. Alternatively, a global tablemay be maintained. The first approach lends itself well to theobject-oriented coding paradigm whereas the second approach is moresuitable to a procedural style of coding. Those skilled in the art willrecognize that other methods of identifying and noting the portions ofmemory used by the simulation context may be employed within the scopeof the present invention.

In the case of a global indexing scheme, the pertinent variables areidentified by a special call when they are defined, i.e., when theirmemory is allocated. To this end, instead of calling standard run-timeallocation procedure, an intermediate function call is used that callsthe allocation procedure as done otherwise, but before it returns, itregisters the allocated memory as being part of the context.

Note that the indexing scheme can be extended to store local modelinformation to facilitate selective context restoration. As such, thecontext of a subsystem in a model can be identified and restored uponrequest, even in case of model changes elsewhere that affect the memorylayout of those parts. The preferred embodiment tracks the instances ofmodel parts and the memory they allocate, which is then assigned aunique identifier.

With the modularization of the numerical solvers, and the initiative toincreasingly apply object-oriented coding principles, the need for amore distributed implementation has emerged. In this architecture, itbecomes desirable not to have a global index of pertinent memory, but tomaintain this locally for each object. A context sensitive objectimplements an access method to make its context available. Severalimplementations are possible. For example, an object could produce anindex to each memory location that is part of the context and have thestreaming operation performed by the caller, or it could stream thememory content itself.

This local indexing scheme supports selective memory restoration forparts of the model (e.g., one subsystem only) as it is object basedIndexing the origin in the model of context fragments, optionallycombined with a conversion mechanism between type implementations,allows restoration between platforms and different compiled versions ofmodels. This supports, e.g., having a controller reach a steady stateoperating point in simulation in combination with a detailedphenomenological plant model, storing the context, and then aftergenerating code for the controller, using the same context to initializethe controller code.

The type of the indexing being used, centralized or distributed has tobe selected. This is related to the coupling of the indexing to thememory allocation calls: A table keeps track of the parts of memory thatare part of the context. When memory for an instance is allocated, it isindexed as being part of the context which allows restoring it. Astraightforward approach indexes all the RK45 specific memory of thisinstance by <address, size> tuples. Given the base address of the RK45instance and the size of its type, the entire part of memory isconsidered part of the context.

In order to exempt the referencing part of memory, the memory allocationcall for the referenced variables can be exploited. This preventsredundancy that would be required when the type definition wouldexplicitly exclude referenced parts of memory. This approach isillustrated in FIG. 8A. When the RK45 instance is defined, an <address,size> tuple marks the corresponding part of memory 800, including bothvalues and references. Next, when one of the referenced variables, x0,is defined, in FIG. 8B, an <address, size> tuple is created that marksthe memory 802 where its values are located. In the same function, a<address, size> tuple is created as part of a parallel indexing scheme804 that keeps track of areas in memory with references. Thus oneimplementation of the present invention includes two indexing schemeswith <address, size> tuples, one for the context related memory withboth values and references 800 and one for the parts of this memory 802that contain references. This implementation allows the exploitation ofallocation calls for indexing. Alternatively, the <address, size> tuplein the memory indexing scheme with references could be partitioned whenone of these referenced variables is defined. This requires a somewhatmore sophisticated registration mechanism. In an alternateimplementation, the memory area is not dynamically constructed buthard-coded as the set of variables that are part of the context. Bothindexing schemes are implemented and used in conjunction with oneanother.

Since the work arrays of user defined functions are part of the indexedmemory, no additional effort is required to make a user defined blockadhere to the restoration scheme as long as variables are declaredthrough the standard interface. For example, the interface to declarecontinuous state variables is ssSetNumContStates(S, NUM_CONT_STATES),where S references the user-defined system and NUM_CONT_STATES thenumber of continuous states. To facilitate more flexibility, an optionfor the user to stream selected variables to and from file is alsoimplemented for user defined blocks.

Due to the indexing scheme for the areas in memory that need to bestored and restored, a mechanism is required to invoke the indexingoperations and to facilitate the context restoration. It is important tonote that the memory that is part of the context is all allocated when asimulation run is requested. It has to be indexed anew before eachsimulation is executed because changes to the execution may have beenmade (e.g., a different solver may have been chosen).

The restoration process is implemented around the main simulation loopas shown in italics in the following code snippet: intSimulateModel(slModel *model, CmdlInfo *cmdlInfo) { . . .sm_SimStatus(model, SIMSTATUS_RUNNING); if( slLoadContext(model))ssSetTFinal(S, getCtxTFinal( )); while (ssGetT(S) < ssGetTFinal(S)) { .. . } slCtxStore(model); /*store context for possible continuation */ if(!stopRequested) { ssSetStopRequested(S,true); errmsg =slDoOutputAndUpdate(model); if (errmsg != SL\_NoError) return(errmsg); }. . . return(errmsg); } /* end SimulateModel */

Before a simulation starts, it is determined whether the simulationcontext needs to be restored by means of a call to slLoadContext whichis executed in the same function call in cases where the restore flag isset. Once the context is restored, simulation proceeds as if invokednormally. Once completed, the indexed memory is stored by the slCtxStorecall if the StoreSimulationContext flag of the block diagram is set bythe user. The context is

-   -   written to a file with an mcx extension in one implementation.

The flow chart in FIG. 9 depicts the implementation of the restorationmechanism. The context indexing is initiated when a model attributesimulationContext is not yet set. This is to ensure that when a newsimulation run is requested, the originally indexed memory is clearedand reassigned. Otherwise, it would be appended and the same area inmemory would be indexed an increasing number of times (related to thenumber of times a simulation was run). As soon as the context is writtento file by slCtxStore, or in case of another exit path (e.g., because oferror conditions) simulationContext is reset to indicate that a newsimulation run may start.

When a new run is initiated, the first context redirected allocationcall resets ContextInitializationComplete, resets the index, and createsthe first <address, size> tuple. Consecutive allocation calls thencomplete the memory index, including the scheme that indexes the partsof context memory that contain references instead of values. Thisfunctionality is required at all times (i.e., also when the context isnot restored) since it facilitates context storage. A determination isthen made as to whether the user requested a simulation continuation,indicated by the loadContext flag. If so, the model checksum thatcaptures the memory map of the model of the stored context is validatedand when it complies with the checksum of the model to be simulated, thecontext is restored. This is important because the model memory map hasto be compatible with that of the model used to save the simulationcontext. The main simulation loop is then executed and when completedthe present simulation context is written to file. It should be notedthat the context save has to be done before the slDoOutputAndUpdate thatfollows because in case of a fixed step size, evaluatingslDoOutputAndUpdate puts the state of the discrete pulse generator tothe next point time, but restart continues from the current point.

FIG. 9 depicts the sequence of steps by which the simulation engine mayrestore simulation contexts and then execute. The sequence begins withthe loadContext variable set to zero (step 920). A determination is madeas to whether a stored simulation context is available (step 922). Ifone is available, the loadContext variable is set to one (step 924).Next, the restoreSimulationContext variable is set to equal theloadContext variable (step 926). If the simulationContext variable isnot set (step 927), memory is assigned (step 928). Next, thesimulationContext memory is loaded (step 930) and confirmation of theloading is made (step 931). If the simulation context has been restored,simulation takes place (step 933). The simulation context may be savedfollowing simulation depending upon the user's wishes (step 933)determined either prior to simulation or interactively. If thesimulation context is to be saved, it is saved (step 934) and thesimulationContext variable reset to NULL (step 936) while freeing theassigned memory. If the simulation context is not being saved, thesimulationContext value is still set to NULL (step 936).

The restored simulation context may be used to run multiple analysesfrom a common reproducible point to test alternatives. The restoredsimulation context may be used to run the alternative analysessimultaneously in parallel. In other embodiment, the simulation contextmay be used to update a construction model. The restoration of thesimulation context saves significant time over previous simulationmethods by ensuring accuracy despite not having to re-run a simulationfor transitory or initialization stages of a simulation. Multiplesimulation contexts may also be saved from a running simulation withoutstopping the simulation thus helping in debugging and other types ofanalysis. The illustrative embodiment of the present invention enablessimulation of a wide variety of systems and is not limited to time-basedblock diagrams.

In another embodiment, the simulation of reversible reactions isoptimized. In these embodiments, the state array is parsed to identifywhether “both directions” of a reversible reaction occur at the samesimulation time in the state array, i.e., the next two reactions to besimulated are Ce->Br and Br->Ce. When this occurs, both reactions areskipped, since they cancel one another out. Using well-known codeoptimization techniques, this concept may be extended to three or morereactions that, together, cancel one another out, e.g., Ce->Br, Br->Pb,Pb->Ce.

Referring again to FIG. 1, the results generated by the simulationengine 120 may be used by an analysis environment 130. In otherembodiments, the analysis environment 130 operates directly on a modelto, for example, generate a steady-state value for a modeled systeminstead of simulating the system. In some of these embodiments, theanalysis tool 120 does this by setting the derivative of alldifferential equations to 0 and solving the system algebraically. Inothers of these embodiments, the analysis engine performs a flux-balanceanalysis, as is known in the art, to determine the steady-state value ofa system. Other well-known forms of analysis that may be employed by theanalysis environment 120 include using non-linear solvers, sensitivityanalysis, bifurcation analysis, parameter scans, parameter estimationand network inference analysis. The result of these analyses may beprovided to the simulation engine 120 as input for its calculations.

The analysis environment 130 may further process the results generatedby the simulation engine 120 or it may display the results visually orauditorially. For example, the analysis environment 120 may use graphvisualization techniques to identify to a user similar pathways. In someembodiments the analysis environment 130 interfaces with dataacquisition hardware (not shown in FIG. 1) which allows the analysisenvironment 130 to compare the generated results with experimental data.In these embodiments, data gathered from an ongoing experiment is usedto correct or generate a model of the reaction that is occurring insitu. In some embodiments the experiment is conducted on a microarray ora gene chip. For example, if the existence of a given protein ispredicted by a model but data acquired from the experiment indicatesthat the protein does not exist, the analysis tool 130 may signal auser, either auditorially or visually, that the in situ experiment andthe predicted response differ. For embodiments in which the experimentis conducted on a microarray, the gathered data may differ betweenmicrowells. In these embodiments, the analysis tool may average thevalue of the gathered data. In others of these embodiments, the analysisenvironment 130 may signal a difference if the data from a singlemicrowell differs from the model's predicted response. In someembodiments, the amount of tolerable difference between the in situexperiment and the predicted result is user-configurable. In otherembodiments, the analysis tool transmits the gathered data to themodeling environment 110 so that the model may be modified to accountfor the difference. In still other embodiments, the analysis environment130 graphically displays the expected result of the experiment and datagathered from the experiment.

In other embodiments, the data acquisition hardware allows the analysistool to control an experiment that is in progress based on the resultsgenerated by the simulation engine 120. These embodiments may be usefulin construction of nanomachinery. In these embodiments, a model may callfor in situ temperature to be at 102 degrees Farenheit. If athermocouple measuring temperature of the in situ environment indicatesthat the temperature has fallen below 102 degrees Farenheit, more heatmay be applied to the experiment.

Data acquisition hardware may include any of a number of hardwaredevices compatible with the computing platform executing the integratedmodeling, simulation, and analysis environment 100. For example, inembodiments in which the environment 100 executes on a personalcomputer, the data acquisition hardware interfaces with the local systembus 220. In embodiments such as those shown in FIG. 2B, the dataacquisition hardware interfaces with the HyperTransport bus, Rapid I/Obus, or InfiniBand. The data acquisition hardware can communicate withinstruments and experiments that use GPIB (IEEE-488, HPIB), VISA,TCP/IP, and UDP standards.

Although the systems and methods of the present invention have beendescribed above as executing on a single machine, they may also be usedin a client-server environment such as X-Windows or Microsoft TerminalServices. The modeling environment 110, simulation engine 120, andanalysis environment 130 may each execute on separate machines, or theymay be aggregated in any combination between machines. For example, inone particular embodiment, the modeling environment 110 and the analysisenvironment0 130 execute on a “client” machine while the simulationengine executes on a “server” machine. In these embodiments, thecomputers may be connected via a number of network topologies includingbus, star, or ring topologies. The network can be a local area network(LAN), a metropolitan area network (MAN), or a wide area network (WAN)such as the Internet. And the respective computers may connect to thenetwork 180 through a variety of connections including standardtelephone lines, LAN or WAN links (e.g., T1, T3, 56 kb, X.25), broadbandconnections (ISDN, Frame Relay, ATM), and wireless connections.Connections can be established using a variety of communicationprotocols (e.g., TCP/IP, IPX, SPX, NetBIOS, NetBEUI, SMB, Ethernet,ARCNET, Fiber Distributed Data Interface (FDDI), RS232, IEEE 802.11,IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and direct asynchronousconnections).

An embodiment of the present invention relates to a computer storageproduct including a computer-readable medium having computer codethereon for performing various computer-implemented operations. Themedia and computer code may be those specially designed and constructedfor the purposes of the present invention, or they maybe of the kindwell known and available to those having skill in the computer softwarearts. Examples of computer-readable media include, but are not limitedto: magnetic media such as hard disks, floppy disks, and magnetic tape;optical media such as CD-ROMs, CD-R/RW discs, DVD-ROMs, DVD-RAMs, andholographic devices; magneto-optical media such as floptical disks;solid-state memories such as flash drives, memory sticks, xD cards,MultiMedia cards, and Smart Media cards; and hardware devices that arespecially configured to store and execute program code, such asapplication-specific integrated circuits (“ASICs”), field-programmablegate arrays (FPGAs), programmable logic devices (“PLDs”), read onlymemories (“ROMs”), random access memories (“RAMs”), erasableprogrammable read only memories (“EPROMs”), and electrically erasableprogrammable read only memories (“EEPROMs”).

Examples of computer code that may be embodied on such computer-readablemedia include machine code, such as produced by a compiler, and filescontaining higher level code that are executed by a computer using aninterpreter. For example, an embodiment of the invention may beimplemented using Java, C++, or other object-oriented programminglanguage and development tools.

While the present invention has been described with references tovarious specific embodiments, it should be understood by those skilledin the art that various changes may be made and equivalents substitutedwithout departing manufactured by the spirit and scope of the inventiondefined by the appended claims. In addition, modifications may be madeto adapt to a particular situation, material, composition of matter,method, process, series of steps to the objective of the presentinvention while staying within the spirit and scope of the invention andsuch modifications are intended to be within the scope of the appendedclaims. In particular, while the methods disclosed have been describedwith reference to particular steps in a particular order, it will beunderstood that these steps may be combined, sub-divided, or reorderedto form an equivalent method without departing manufactured by theteachings of the present invention. Accordingly, unless specificallyindicated herein, the order and grouping of steps is not a limitation ofthe present invention.

1. A system for integrated modeling, simulation and analysis of abiological system that includes processes that may be described bychemical reactions, the system comprising: a modeling component forconstructing a model of the biological system; a simulation engine incommunication with said modeling component, said simulation engineaccepting as input the constructed model of the biological system andgenerating dynamic behavior of the constructed model as output; and ananalysis environment in communication with said simulation engine andsaid modeling component, said analysis environment for analyzing aspectsof the constructed model.
 2. The system of claim 1 wherein the modelingcomponent comprises an environment for construction of a block diagrammodel of the biological system.
 3. The system of claim 2 wherein themodeling component further includes at least one block identifying a setof related chemical reactions.
 4. The system of claim 1 wherein themodeling component accepts user commands and input for constructing themodel of the biological system.
 5. The system of claim 1 wherein saidsimulation engine generates the dynamic behavior of the constructedmodel using a stochastic computational model.
 6. The system of claim 1wherein said simulation engine generates the dynamic behavior of theconstructed model using a discrete time-based computational model. 7.The system of claim 1 wherein said simulation engine generates thedynamic behavior of the constructed model using a continuous time-basedcomputational model.
 8. A method for integrated modeling, simulation andanalysis of a biological process comprising a plurality of chemicalreactions, the method comprising the steps of: (a) constructing a modelof a the biological process; (b) generating, using the constructed modelof the biological process, dynamic behavior of the modeled biologicalprocess; and (c) displaying the dynamic behavior on a display device. 9.The method of claim 8 wherein step (a) comprises constructing a blockdiagram model of a chemical reaction that is part of the biologicalprocess.
 10. The method of claim 9 wherein the block diagram modelincludes at least one block identifying a set of related chemicalreactions that are part of the biological process.
 11. The method ofclaim 8 where step (a) further comprises: (i) providing a graphical userinterface for accepting user commands and data; (ii) receiving, via theprovided graphical user interface, user commands and data; and (iii)constructing, using the received user commands and data, a model of thebiological process.
 12. The method of claim 8 wherein step (b) comprisesgenerating, using the constructed model of the biological process,dynamic behavior of the modeled biological process using a stochasticcomputational model.
 13. The method of claim 8 wherein step (b)comprises generating, using the constructed model of the biologicalprocess, dynamic behavior of the modeled biological process using adiscrete time-based computational model.
 14. The method of claim 8wherein step (b) comprises generating, using the constructed model ofthe biological process, and dynamic behavior of the modeled biologicalprocess using a continuous time-based computational model.
 15. Anarticle of manufacture having embodied thereon computer-readable programmeans for integrated modeling, simulation and analysis of biologicalprocesses, the article of manufacture comprising: computer-readableprogram means for constructing a model of a biological process;computer-readable program means for generating, using the constructedmodel of the biological process, an expected output of the modeledbiological process; and computer-readable program means for displayingthe dynamic behavior.
 16. The article of manufacture of claim 15 whereinsaid computer-readable program means for constructing a model of thebiological process comprises computer-readable program means forconstructing a block diagram model of a biological process.
 17. Thearticle of manufacture of claim 16 wherein said computer-readableprogram means for constructing a block diagram model of the biologicalprocess includes computer-readable program means for constructing atleast one block identifying a set of related chemical reactions.
 18. Thearticle of manufacture of claim 15 wherein computer-readable programmeans for generating an dynamic behavior of the modeled biologicalprocess comprises computer-readable program means for generating anexpected result of the modeled biological process using a stochasticcomputational model.
 19. The article of manufacture of claim 15 whereincomputer-readable program means for generating an dynamic behavior ofthe modeled biological process comprises computer-readable program meansfor generating an expected result of the modeled biological processusing an event-based computational model.
 20. A method for integratedmodeling, simulation and analysis of a biological process comprising aplurality of chemical reactions, the method comprising the steps of: (a)constructing a model of a biochemical process in a modeling component;(b) analyzing the constructed model of the biological process togenerate a result; and (c) transmitting the result to the modelingcomponent.
 21. The method of claim 20 wherein step (b) comprisesanalyzing the constructed model of the biological process usingbifurcation analysis.
 22. The method of claim 20 wherein step (b)comprises analyzing the constructed model of the biological processusing sensitivity analysis.
 23. The method of claim 20 where step (b)comprises analyzing the constructed model of the biological processusing parameter estimation.
 24. The method of claim 20 wherein step (b)comprises analyzing the constructed model of the biological processusing a non-linear solver.
 25. The method of claim 20 wherein step (b)comprises analyzing the constructed model of the biological processusing flux-balance analysis.
 26. A system for integrated modeling,simulation and analysis of a chemical reaction comprising: a modelingcomponent for constructing a model of the chemical reaction; asimulation engine in communication with said modeling component, saidsimulation engine accepting as input the constructed model of thechemical reaction and generating an expected output based on the model;and an analysis environment in communication with said simulation engineand with said modeling component, said analysis environment performsanalysis and displays the expected output.
 27. The system of claim 26wherein the modeling component comprises an environment for constructionof a block diagram model of a chemical reaction.
 28. The system of claim27 wherein the modeling component further includes at least one blockidentifying a set of related chemical reactions.
 29. The system of claim26 wherein the modeling component accepts user commands and input forconstructing the model of the chemical reaction.
 30. The system of claim26 wherein said simulation engine generates the expected output using astochastic computational model.
 31. The system of claim 26 wherein saidsimulation engine generates the expected output using a discretetime-based computational model.
 32. The system of claim 26 wherein saidsimulation engine generates the expected output using a continuoustime-based computational model.
 33. A method for integrated modeling,simulation and analysis of chemical reactions, the method comprising thesteps of: (a) constructing a model of a chemical reaction; (b)generating, using the constructed model of the chemical reaction, anexpected output of the modeled chemical reaction; and (c) displaying theexpected output on a display device.
 34. The method of claim 33 whereinstep (a) comprises constructing a block diagram model of a chemicalreaction.
 35. The method of claim 34 wherein the block diagram modelincludes at least one block identifying a set of related chemicalreactions.
 36. The method of claim 33 wherein step (a) comprises: (i)providing a graphical user interface for accepting user commands anddata; (ii) receiving, via the provided user interface, user commands anddata; and (iii) constructing, using the received user commands and data,a model of the chemical reaction.
 37. The method of claim 33 whereinstep (b) comprises generating, using the constructed model of thechemical reaction, an expected output of the modeled chemical reactionusing a stochastic computational model.
 38. The method of claim 33wherein step (b) comprises generating, using the constructed model ofthe chemical reaction, an expected output of the modeled chemicalreaction using a discrete time-based computational model.
 39. The methodof claim 33 wherein step (b) comprises generating, using the constructedmodel of the chemical reaction, an expected output of the modeledchemical reaction using a continuous time-based computational model. 40.An article of manufacture having embodied thereon computer-readableprogram means for integrated modeling, simulation and analysis ofchemical reactions, the article of manufacture comprising:computer-readable program means for constructing a model of a chemicalreaction; computer-readable program means for generating, using theconstructed model of the chemical reaction, an expected output of themodeled chemical reaction; and computer-readable program means fordisplaying the expected output.
 41. The article of manufacture of claim40 wherein said computer-readable program means for constructing a modelof the chemical reaction comprises computer-readable program means forconstructing a block diagram model of a chemical reaction.
 42. Thearticle of manufacture of claim 41 wherein said computer-readableprogram means for constructing a block diagram model of the chemicalreaction includes computer-readable program means for constructing atleast one block identifying a set of related chemical reactions.
 43. Thearticle of manufacture of claim 40 wherein computer-readable programmeans for generating an expected result of the modeled chemical reactioncomprises computer-readable program means for generating an expectedresult of the modeled chemical reaction using a stochastic computationalmodel.
 44. The article of manufacture of claim 40 whereincomputer-readable program means for generating an expected result of themodeled chemical reaction comprises computer-readable program means forgenerating an expected result of the modeled chemical reaction using anevent-based computational model.
 45. A method for integrated modeling,simulation and analysis of chemical reactions, the method comprising thesteps of: (a) constructing a model of a chemical reaction; (b) analyzingthe constructed model of the chemical reaction to generate a result; and(c) transmitting the result to the modeling environment.
 46. The methodof claim 45 wherein step (b) comprises analyzing the constructed modelof the chemical reaction using bifurcation analysis.
 47. The method ofclaim 45 wherein step (b) comprises analyzing the constructed model ofthe chemical reaction using sensitivity analysis.
 48. The method ofclaim 45 wherein step (b) comprises analyzing the constructed model ofthe chemical reaction using parameter estimation.
 49. The method ofclaim 45 wherein step (b) comprises analyzing the constructed model ofthe chemical reaction using a non-linear solver.
 50. The method of claim45 wherein step (b) comprises analyzing the constructed model of thechemical reaction using flux-balance analysis.
 51. The method of claim45 wherein step (b) comprises generating, using the constructed model ofthe chemical reaction, an expected result of the modeled chemicalreaction using a continuous time-based computational model.